﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace Indeco.G24.Website.UserControls
{
    public partial class TabChungtayxaydung : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Add control vao Tab Chung tay xay dung
            Control UserControlRSSBlog = this.LoadControl("~/UserControls/RssReader.ascx");
            UserControls.RssReader rssReader = (UserControls.RssReader)UserControlRSSBlog;
            rssReader.RssUrl = "http://gia24.vn/chungtayxaydung/blogs/MainFeed.aspx";
            rssReader.RssMaxItems = 10;
            DevExpress.Web.ASPxTabControl.TabPage tabPageBlog = new DevExpress.Web.ASPxTabControl.TabPage();
            tabPageBlog.Text = "Blog";
            tabPageBlog.Controls.Add(rssReader);
            ASPxPageControlRssChungtayxaydung.TabPages.Add(tabPageBlog);
            DevExpress.Web.ASPxTabControl.TabPage tabPageForum = new DevExpress.Web.ASPxTabControl.TabPage();
            
            Control UserControlRSSForum = this.LoadControl("~/UserControls/RssReader.ascx");
            rssReader = (UserControls.RssReader)UserControlRSSForum;
            rssReader.RssUrl = "http://gia24.vn/chungtayxaydung/forums/rss.aspx?ForumID=101&Mode=0";
            rssReader.RssMaxItems = 10;
            tabPageForum.Text = "Diễn đàn";
            tabPageForum.Controls.Add(rssReader);
            ASPxPageControlRssChungtayxaydung.TabPages.Add(tabPageForum);

        }
    }
}